<?php
//	20090211
// 	GetLangString updated
		include ("status.php");

	$query        = "SELECT * from users";
	if ($_REQUEST['show']=='admin'){
//		include ("status.php");
		$query .= " where (`status` & $STA_ADMIN)";
		
	} else
	if ($_REQUEST['show']=='mod'){
//		include ("status.php");
		$query .= " where (`status` & $STA_MOD)";
		
	} else	
	
	if ($_REQUEST['show']=='adminmod'){
//		include ("status.php");
		$query .= " where (`status` & $STA_ADMIN) or (`status` & $STA_MOD)";
		
	} else
$query .= " where (status & $STA_MEMBER) and not (status & $STA_BANNED)";


$query .= " order by `signup` desc ";	
	$result = mysql_query($query);
	if (mysql_num_rows($result)){ 
		while ($profileinfo = mysql_fetch_array($result)){
			$status = GetStatusImg($profileinfo['status']);
			$img = "/index.php?do=getphoto&id=".$profileinfo['photo']."&size=75&square=1";			
			//$img = "images/sheep.png";
			$profiles .= " <div class=\"userthumb\">
											<a href=\"/index.php?do=profile&profile_id=".$profileinfo['id']."\">												
											".$profileinfo['name']."</a><br>$status<br><img src=\"$img\" title=\"$TXT_NOIMG\" 
												width=\"75\" height=\"75\"></div>";
		}
	$SITE_MIDDLE .= FormatElement ( GetLangString($lang,"txt_profiles"),$profiles);
	}

?>
